package net.pws.oos.biz.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "b_checkin")
public class Checkin extends Locatable {

	private static final long serialVersionUID = -2739631804780628320L;
	
	public static final String IN_PROGRESS_STATUS = "in_process";

	public static final String COMPLETED_STATUS = "completed";
	
	public static final String ON_DUTY = "on-duty";
	
	public static final String OFF_DUTY = "off-duty";
	
	private String name;

	private String description;
	
	private String type;
	
	private String status;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "exec_organ_id")
	private Organization executeOrganization;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "exec_person_id")
	private User executePerson;

	@Column(name = "create_datetime")
	private Date createDateTime;

	@Column(name = "upload_date")
	private Date uploadDate;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Organization getExecuteOrganization() {
		return executeOrganization;
	}

	public void setExecuteOrganization(Organization executeOrganization) {
		this.executeOrganization = executeOrganization;
	}

	public User getExecutePerson() {
		return executePerson;
	}

	public void setExecutePerson(User executePerson) {
		this.executePerson = executePerson;
	}

	public Date getCreateDateTime() {
		return createDateTime;
	}

	public void setCreateDateTime(Date createDateTime) {
		this.createDateTime = createDateTime;
	}

	public Date getUploadDate() {
		return uploadDate;
	}

	public void setUploadDate(Date uploadDate) {
		this.uploadDate = uploadDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
